﻿<UserControl x:Class="ShopOnline.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
   d:DesignHeight="398" d:DesignWidth="906" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="400*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="110"/>
            <ColumnDefinition Width="796*" />
        </Grid.ColumnDefinitions>

        <Grid Name="Header" Grid.Row="0" Grid.ColumnSpan="2" Background="DarkBlue">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <TextBlock Foreground="Wheat" VerticalAlignment="Center" HorizontalAlignment="Left"
                    FontSize="18" FontFamily="Lucida Sans Unicode">Online non-stop shop for stuff :-)
                </TextBlock>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <TextBlock Text="[User Info]" Foreground="Wheat"
                    Name="textBlockLoggedUser" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <TextBlock Text="   " FontSize="20"/>
                <HyperlinkButton Name="hyperlinkButtonLoginLogout" FontSize="16" VerticalAlignment="Center"
                    Content="Login" Click="hyperlinkButtonLoginLogout_Click" />
                <TextBlock Text="   " FontSize="16" />
            </StackPanel>
        </Grid>
        <Grid Name="Menu" Grid.Row="1">
            <Border BorderBrush="Black" BorderThickness="1" Margin="0,0,-18,0">
                <StackPanel Name="MenuList" Background="BlanchedAlmond" HorizontalAlignment="Stretch">
                    <HyperlinkButton NavigateUri="/Views/HomePage.xaml" Content="Home" 
                                 TargetName="MainFrame" FontSize="14" Margin="10 0 0 0"/>
                    <HyperlinkButton NavigateUri="/Views/ViewProducts.xaml" Content="View products" 
                                 TargetName="MainFrame" FontSize="14" Margin="10 0 0 0"/>
                    <HyperlinkButton NavigateUri="/Views/ViewOrders.xaml" Content="Orders" 
                                 TargetName="MainFrame" FontSize="14" Margin="10 0 0 0" Click="HyperlinkButton_Click"/>
                </StackPanel>
            </Border>
        </Grid>

        <Grid Name="MainContent" Grid.Row="1" Grid.Column="1" Margin="15,0,0,0">
            <Border BorderBrush="Black" BorderThickness="1">
                <sdk:Frame Height="342" HorizontalAlignment="Left" Name="MainFrame" VerticalAlignment="Top" Width="795"
                       Navigated="ContentFrame_Navigated" Source="/Views/HomePage.xaml"
                       NavigationFailed="ContentFrame_NavigationFailed">
                </sdk:Frame>
            </Border>
        </Grid>
    </Grid>
</UserControl>
